package com.simple.portal.web;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import freemarker.template.TemplateException;

@Controller
@RequestMapping("/rights")
public class RightsController extends AbstractPortalBaseController{
	private final static String JSP_PATH = "_Rights";
	
	
	@RequestMapping("/init")  
    public String init(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TemplateException  {

      
        //system(request, response);
        //app(request, response);
        return  system(request, response);
    }
	
	@RequestMapping("/myrights")  
    public String myRights(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TemplateException  {

      
        return getJspPath("my_rights");
    }
	
	@RequestMapping("/list")  
    public String list(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TemplateException  {

      
        return getJspPath("rights_list");
    }
	
	@RequestMapping("/system")  
    public String system(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TemplateException  {

      
        return getJspPath("system");
    }
	
	@RequestMapping("/app")  
    public String app(final HttpServletRequest request, final HttpServletResponse response) throws IOException, TemplateException  {

      
        return getJspPath("app");
    }
	
	@Override
    protected String getBaseJspPath() {
        return JSP_PATH;
    }
}

